//
//  FPBorrowingAndRepaymentCell.m
//  FinanceProject
//
//  Created by 陈显摆 on 2025/2/8.
//

#import "FPBorrowingAndRepaymentCell.h"

@implementation FPBorrowingAndRepaymentCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.backgroundColor = UIColor.clearColor;
    self.contentView.backgroundColor = UIColor.clearColor;
    self.backView.backgroundColor = UIColor.whiteColor;
    self.backView.clipsToBounds = YES;
    self.backView.layer.cornerRadius = 8.f;
    
    self.titleLab.textColor = [UIColor hexColor:@"#000000"];
    self.subTitleLab.textColor = [UIColor hexColor:@"#6A6A6A"];
    self.statusLab.textColor = [UIColor hexColor:@"#6A6A6A"];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setBorrowingListStatus:(FPBorrowingStatusType)status {
    
    if (status == FPBorrowingStatusTypeSuccess) {
        
        self.statusLab.textColor = MAIN_BLUE_COLOR;
        self.statusLab.text = @"放款成功";
        
        self.arrowImgView.hidden = NO;
    }
    else if (status == FPBorrowingStatusTypeFaild) {
    
        self.statusLab.textColor = [UIColor hexColor:@"#F12D2D"];
        self.statusLab.text = @"失败";
        
        self.arrowImgView.hidden = YES;
    }
    else  if (status == FPBorrowingStatusTypeInReview) {
        
        self.statusLab.textColor = [UIColor hexColor:@"#6A6A6A"];
        self.statusLab.text = @"审核中";
        
        self.arrowImgView.hidden = YES;
    }
    
   
}


- (void)setRepaymentListStatus:(FPRepaymentStatusType)status {
    
    if (status == FPRepaymentStatusTypeRepaying) {
    
        self.statusLab.textColor = MAIN_BLUE_COLOR;
        self.statusLab.text = @"还款中";
    }
    else  if (status == FPRepaymentStatusTypeRepaid) {
        
        self.statusLab.textColor = [UIColor hexColor:@"#6A6A6A"];
        self.statusLab.text = @"已结清";
    }
}


@end
